var request = require('request');
var layout = require('../../views/message/layout');
var func = require('{pub}/function');

return {
    template:layout,
    onAfter:function(){
        var that = this;
        //加载系统消息数量
        request.get('user.json', function(res){
            that.element.find('#sysMessage b').html(res.data.count)
        }, null)

        //加载我的提问数量
        request.get('user.json', function(res){
            that.element.find('#myQuestion b').html(res.data.count)
        }, null)
    },
    getData:func.getData
}